package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.annotation.AutoFill;
import com.sky.dto.SetmealDTO;
import com.sky.dto.SetmealPageQueryDTO;

import com.sky.entity.Setmeal;
import com.sky.enumeration.OperationType;
import com.sky.vo.DishItemVO;
import com.sky.vo.SetmealVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SetmealMapper {

    List<SetmealVO> pageSetmeal(SetmealPageQueryDTO setmealPageQueryDTO);
    @AutoFill(OperationType.UPDATE)
    void updateSetmeal(Setmeal setmeal);

    Setmeal getSetmealById(@Param("id") String id);

    @AutoFill(OperationType.INSERT)
    void addSetmeal(Setmeal setmeal);

    Long getId(String name);

    @AutoFill(OperationType.UPDATE)
    void changeStatus(Setmeal setmeal);

    void deleteSetmeal(@Param("ids") List<String> ids);


    Integer statisticsOnSale(@Param("ids") List<String> ids);

    Integer countCategoryNumber(@Param("id") String id);

    List<Setmeal> getSetmealByIds(@Param("setmeal_ids")List<Integer> setmeal_ids);

    List<Setmeal> getSetmealByCategoryId(String categoryId);

    List<DishItemVO> getSetmealDishByIds(String id);

    Integer countStatus(int status);
}

